<?php /* Smarty version Smarty-3.1.6, created on 2017-02-09 10:24:06
         compiled from "F:/cly/Show/Admin/View\Newsclass\showlist.html" */ ?>
<?php /*%%SmartyHeaderCode:20931589bd25b047772-38961358%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '0e0454e276cc68da62e0e9b089ed90a5f0c42cb3' => 
    array (
      0 => 'F:/cly/Show/Admin/View\\Newsclass\\showlist.html',
      1 => 1486607013,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '20931589bd25b047772-38961358',
  'function' => 
  array (
  ),
  'cache_lifetime' => 3600,
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_589bd25b1df2c',
  'variables' => 
  array (
    'newsclass' => 0,
    'news_list' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_589bd25b1df2c')) {function content_589bd25b1df2c($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'F:\\cly\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.html_options.php';
?><!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link href="/Show/Admin/Public/css/news.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/Show/Admin/Public/js/jqselect.js"></script>
    <script type="text/javascript" src="/Show/Admin/Public/js/jquery-3.1.1.min.js"></script>
    <title>新闻栏目</title>
    
    <script type="text/javascript">

      $(document).ready(function(){

       $("td[id]").dblclick(function(){
         var fd = $(this).attr("id");
         var inval = $(this).html();
         $(this).html("<input id='e"+fd+"' value='"+inval+"'>");

         $("#e"+fd).focus().on("blur",function(){
           var edval = $(this).val();
           $(this).parents("td").html(edval);
           $.post("ajax/newsclass.php",{id:fd,val:edval},function(data){
             $("#div").html(data);
           });
         });
       });

        $("input[name='name']").focus(function(){
          $(this).parents("tr").addClass("bgcolor");
        }).on("blur",function(){
          $(this).parents("tr").removeClass("bgcolor");
        })

      });

    </script>
   
   </head>
   <body>
    <form action="add_newsclass.php" method="post">
    <div class="mainbox">
          <div class="title">&nbsp;&nbsp;添加新闻栏目</div>
          <div class="tablebox">
            <table class="table tb">
              <tr>
                <td>
                 所属栏目
                 <?php echo smarty_function_html_options(array('name'=>"news_type",'options'=>$_smarty_tpl->tpl_vars['newsclass']->value),$_smarty_tpl);?>

                 <input type="text" name="name" required="required">
                 <input type="submit" name="sub" value="添加">
                </td>
              </tr>
            </table>
          </div>
    </div>
    </form>
    <form action="add_newsclass.php" method="post">
    <div class="mainbox">
          <div class="tablebox">
            <table class="table">
              <tr class="one">
                <td>
                <input type="checkbox" id="selectAll">全选
                <input type="checkbox" id="unselectAll">反选
                </td>
                <td>ID</td>
                <td><span class="span three">栏目名称</span></td>
                <td><span class="span four">内容数</span></td>
                <td id="a">操作</td>
              </tr>
              <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['n'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['n']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['name'] = 'n';
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['news_list']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['n']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['n']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['n']['total']);
?>
              <tr>
                <td><input type="checkbox" name="select[]" value="<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['id'];?>
"></td>
                <td><?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['id'];?>
</td>
                <td id="<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['name'];?>
</td>
                <td>数量</td>
                <td>
                  <a href="#" onclick="if(confirm('确定删除?'))(location.href='add_newsclass.php?id=<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['id'];?>
')"><img src="/Show/Admin/Public/image/del.jpg" title="删除"></a>
                </td>
              </tr>
                <?php if ($_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass']){?>
                <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['z'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['z']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['name'] = 'z';
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['z']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['z']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['z']['total']);
?>
                <tr>
                  <td><input type="checkbox" name="select[]" value="<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['id'];?>
"></td>
                  <td><?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['id'];?>
</td>
                  <td id="<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['id'];?>
">&nbsp;&nbsp;<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['name'];?>
</td>
                  <td><a href="news_list?id=<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['id'];?>
" target="iframe0">数量</a></td>
                  <td>
                    <a href="#" onclick="if(confirm('确定删除?'))(location.href='add_newsclass.php?id=<?php echo $_smarty_tpl->tpl_vars['news_list']->value[$_smarty_tpl->getVariable('smarty')->value['section']['n']['index']]['zclass'][$_smarty_tpl->getVariable('smarty')->value['section']['z']['index']]['id'];?>
')"><img src="/Show/Admin/Public/image/del.jpg" title="删除"></a>
                  </td>
                </tr>
                <?php endfor; endif; ?>
                <?php }?>
              <?php endfor; endif; ?>
              </table>
          </div>
          <div class="ope">
            <input type="submit" name="del" value="删除">
          </div>
    </div>
    </form>
  </body>
</html><?php }} ?>